package com.tsingtree.sys.modular.system.service;

import org.springframework.data.redis.core.ZSetOperations;

import java.math.BigDecimal;
import java.util.Map;
import java.util.Set;

public interface IRedisUtilService {

    void set(String key, String value);

    void hSet(String key, String m, String value);

    Object hGet(String key, String m);

    Boolean zAdd(String key, String value, double score);

    Set<String> zRange(String key, long start, long end);

    Set<ZSetOperations.TypedTuple<String>> zRangeWithScores(String key, long start, long end);

    Set<String> zRangeByScores(String key, long start, long end);

    Long zRemove(String key, String value);

    Boolean zRemoveByScore(String key, double score);

    Long zRemoveRange(String key, int start, int end);

    Set<String> zRevRange(String key, long start, long end);

    Long zCard(String key);

    Boolean hasKey(String key);

    String get(String key);

    void setForTimeHour(String key, String value, long time);

    void setForTimeMinute(String key, String value, long time);

    void setForTimeSecond(String key, String value, long time);

    void put(String key, String hashKey, String value);

    void putAll(String key, Map<String, Map<String, String>> map);

    Long delete(String key, String... hashKeys);

    void delete(String key);

    Long incr(String s);

    BigDecimal getCoinPrice(String coinName);
}
